<template>
	<view class="comments-page">
		<!-- 我的点赞 -->
		<view class="item u-flex u-col-top" v-for="item in list" :key="item.message_id">
			<view class="like">
				<image style="width:22rpx;height: 22rpx;"
					src="https://wxcode.sowreap.cn/nongmuWeChatImage/static/images/icon-like.png" mode=""></image>
				<text class="u-p-l-6 u-font-20 u-content-color">点赞了</text>
			</view>
			<u-image
				:src="item.userinfo.avatar =='' ? 'https://wxcode.sowreap.cn/nongmuWeChatImage/static/images/avatar.png' : item.userinfo.avatar"
				width="68rpx" height="68rpx" shape="circle"></u-image>
			<view class="u-m-l-20">
				<view class="u-font-28">{{ item.userinfo.nickname }}</view>
				<view class="u-font-24 u-tips-color u-m-t-10">{{ item.time }}</view>
				<view class="u-font-28 u-m-t-30">{{ item.content }}</view>
			</view>
		</view>

		<!-- <view class="item u-flex u-col-top">
			<view class="like">
				<image style="width:22rpx;height: 22rpx;"
					src="https://wxcode.sowreap.cn/nongmuWeChatImage/static/images/icon-like.png" mode=""></image>
				<text class="u-p-l-6 u-font-20">点赞了</text>
			</view>
			<u-image src="https://wxcode.sowreap.cn/nongmuWeChatImage/static/images/avatar.png" width="68rpx"
				height="68rpx" shape="circle"></u-image>
			<view class="u-m-l-20">
				<view class="u-font-28">111游客_ODA5NEwmj</view>
				<view class="u-font-24 u-tips-color u-m-t-10">2023-05-30 16:50</view>
				<view class="u-font-28 u-m-t-30">地方很美，偶尔远离大城市的喧嚣看看乡下美景，
					别有一番滋味</view>
			</view>
		</view> -->
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					// 	{
					// 	"message_id": 1,
					// 	"content": "哈哈哈哈",
					// 	"userinfo": {
					// 		"nickname": "150****0001",
					// 		"avatar": ""
					// 	},
					// 	"time": "2023-10-08 10:09:02"
					// },
				]
			}
		},
		onLoad() {
			this.get_comment_myPraise()
		},
		methods: {
			// 我的点赞
			get_comment_myPraise() {
				this.$http({
					url: this.api.comment_myPraise,
					method: 'GET',
				}).then(res => {
					// console.log(res, '我的点赞');
					if (res.code == 1) {
						this.list = res.data.list
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.flex-center {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.comments-page {
		.item {
			padding-bottom: 60rpx;
			border-bottom: 1px solid #E6E6E6;
			margin-bottom: 30rpx;
			position: relative;

			.like {
				position: absolute;
				top: 0rpx;
				right: 10rpx;
				width: 120rpx;
				height: 40rpx;
				border: 1px solid #CCCCCC;
				border-radius: 20rpx;
				@extend .flex-center;
			}
		}
	}
</style>